﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewPostsControl.ascx.cs"
    Inherits="Modules_NewPostsControl" %>
<%@ Import Namespace="AppCommon" %>
<asp:UpdatePanel runat="server" ID="updatePanel1">
    <ContentTemplate>
        <div class="row">
            <!-- new post -->
            <asp:Repeater runat="server" ID="repeaterPosts">
                <ItemTemplate>
                    <div class="col-md-12 fixie-new-post">
                        <p class="line-color">
                            <span class="line-color-green"></span><span class="line-color-blue"></span><span
                                class="line-color-orange"></span><span class="line-color-purple"></span>
                        </p>
                        <h3>
                            <asp:HyperLink runat="server" NavigateUrl='<%# "~/post/" + Eval("UniqueId") %>'><%# Eval("Title") %></asp:HyperLink></h3>
                        <p>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/profile/" + Eval("IdUser") %>'><i class="fa fa-user"></i> <%# GetNameofUser(Convert.ToInt32(Eval("IdUser"))) %></asp:HyperLink>
                            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "~/category/" + Eval("IdCategory") %>'><i class="fa fa-folder-o"></i> <%# GetNameofCategory(Eval("IdCategory").ToString())%></asp:HyperLink>
                            <i class="fa fa-calendar-o"></i> 
                            <%# Eval("LastDateUpdated") %>
                            <i class="fa fa-eye"></i> 
                            <%# Eval("View") %>
                            <span class="float-right">
                                <asp:HyperLink runat="server" CssClass="fb-like" data-href='<%# "~/post/" + Eval("UniqueId") %>'
                                    data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"
                                    EnableViewState="False"></asp:HyperLink>
                                <%--<i class="fb-like" data-href='<%# "~/post/" + Eval("UniqueId") %>' 
                    data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></i>--%>
                            </span>
                        </p>
                        <p class="postdetail-content">
                            <%# Eval("Description") %></p>
                        <p class="thumbnail">
                            <asp:Image CssClass="img-responsive" ImageUrl='<%# Constants.UPLOAD_IPost + Eval("ImageThumbnail") %>'
                                data-src='<%# Constants.UPLOAD_IPost + Eval("ImageThumbnail") %>' AlternateText='<%# Eval("Title") %>'
                                runat="server" />
                        </p>                        
                        <p>
                            <i class="fa fa-tags"></i>
                            <%# SpilitTag(Eval("Tags").ToString()) %></p>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
            <!-- new post -->
        </div>
        <div class="row">
            <div class="col-lg-12">
                <span class="hidden">
                    <asp:Literal runat="server" ID="litCurrentPage"></asp:Literal></span> <span class="hidden">
                        <asp:Literal runat="server" ID="litNextpage"></asp:Literal></span> <span class="hidden">
                            <asp:Literal runat="server" ID="litPrepage"></asp:Literal></span>
                <ul class="pager">
                    <li class="previous">
                        <asp:LinkButton runat="server" ID="lbOlder" Text="&larr; Older" OnClick="lbOlder_OnClick" OnClientClick="test()"></asp:LinkButton></li>
                    <li id="li-next" class="next">
                        <asp:LinkButton runat="server" ID="lbNewer" Text="Newer &rarr;" OnClick="lbNewer_OnClick"></asp:LinkButton></li>
                </ul>
            </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
    function test() {
        $("#li-next").addClass('disabled');
    }
</script>
